#pragma once
#include "xCommon/IxPairVec.h"

[
    default(IxPairVec),
    uuid("076E7BE8-48F6-49e7-A950-54186ED7FC27"),
    coclass
]
class CxPairVec : public IxPairVec
{
    typedef std::pair<CString, CComVariant>     VALUE;
    typedef std::vector<VALUE>                  VALUEVEC;
    typedef VALUEVEC::iterator                  VALUEVECIT;

public:
    CxPairVec();
    virtual ~CxPairVec();
    DECLARE_PROTECT_FINAL_CONSTRUCT()

public:
    // interface of IxPairVec
    HRESULT GetCount(LPINT pnCount);

    HRESULT GetName(INT nIndex, LPBSTR pbsName);

    HRESULT AddStr(BSTR bsName, BSTR bsValue);
    HRESULT GetStr(INT nIndex, LPBSTR pbsValue);

    HRESULT AddInterface(BSTR bsName, IUnknown* pUnknown);
    HRESULT GetInterface(INT nIndex, REFIID riid, void** ppvValue);

public:
    VALUEVEC    m_vecData;
};